import { defineStore } from "pinia";

export const useApp = defineStore("app", {
  state: () => {
    return {
      asideWidth: "250px",
      logo: `
        /$$   /$$           /$$                 /$$      /$$                                                  
        | $$  /$$/          | $$                | $$$    /$$$                                                  
        | $$ /$$/  /$$   /$$| $$$$$$$   /$$$$$$ | $$$$  /$$$$  /$$$$$$  /$$$$$$$   /$$$$$$   /$$$$$$   /$$$$$$ 
        | $$$$$/  | $$  | $$| $$__  $$ /$$__  $$| $$ $$/$$ $$ |____  $$| $$__  $$ |____  $$ /$$__  $$ /$$__  $$
        | $$  $$  | $$  | $$| $$  \ $$| $$$$$$$$| $$  $$$| $$  /$$$$$$$| $$  \ $$  /$$$$$$$| $$  \ $$| $$$$$$$$
        | $$\  $$ | $$  | $$| $$  | $$| $$_____/| $$\  $ | $$ /$$__  $$| $$  | $$ /$$__  $$| $$  | $$| $$_____/
        | $$ \  $$|  $$$$$$/| $$$$$$$/|  $$$$$$$| $$ \/  | $$|  $$$$$$$| $$  | $$|  $$$$$$$|  $$$$$$$|  $$$$$$$
        |__/  \__/ \______/ |_______/  \_______/|__/     |__/ \_______/|__/  |__/ \_______/ \____  $$ \_______/
                                                                                            /$$  \ $$          
                                                                                          |  $$$$$$/          
                                                                                            \______/           
`,
    };
  },
  getters: {},
  actions: {
    // 展开或缩起侧边
    handleAsideWidth() {
      if (this.asideWidth === "250px") {
        this.asideWidth = "60px";
      } else {
        this.asideWidth = "250px";
      }
    },
  },
});
